package com.bootdo.syn.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.syn.dao.SynFileTableDao;
import com.bootdo.syn.domain.SynFileTable;
import com.bootdo.syn.service.SynFileTableService;



@Service
public class SynFileTableServiceImpl implements SynFileTableService {
	@Autowired
	private SynFileTableDao synFileTableDao;
	
	@Override
	public SynFileTable get(Long id){
		return synFileTableDao.get(id);
	}

	@Override
	public Long getByLastId() {
		return synFileTableDao.getByLastId();
	}

	@Override
	public List<SynFileTable> list(Map<String, Object> map){
		return synFileTableDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return synFileTableDao.count(map);
	}
	
	@Override
	public int save(SynFileTable synFileTable){
	
		if(synFileTable.getId() != null) {
			return synFileTableDao.update(synFileTable);
		}else {
			return synFileTableDao.save(synFileTable);
		}		
	
		
	}
	
	@Override
	public int update(SynFileTable synFileTable){
		return synFileTableDao.update(synFileTable);
	}
	
	@Override
	public int remove(Long id){
		return synFileTableDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return synFileTableDao.batchRemove(ids);
	}
	
}
